#include "CLS_WgtTreeWidgetItem.h"

CLS_WgtTreeWidgetItem::CLS_WgtTreeWidgetItem(int _iType)
    :QTreeWidgetItem(_iType)
{
}

void CLS_WgtTreeWidgetItem::setData(int _iColumn, int _iRole, const QVariant &_varValue)
{
    const bool blCheckStatusChange = (_iColumn == 0 && _iRole == Qt::CheckStateRole && data(_iColumn, _iRole).isValid() && checkState(0) != _varValue);
    QTreeWidgetItem::setData(_iColumn, _iRole, _varValue);
    if (blCheckStatusChange)
    {
        emit SignCheckStateChanged(this, checkState(0));
    }
}

CLS_WgtTreeWidgetItem::~CLS_WgtTreeWidgetItem()
{

}

